<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <link rel="stylesheet" href="layui/css/layui.css" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" href="fonts/iconfonts.css" th:href="@{/fonts/iconfonts.css}">
    <script type="text/javascript" src="js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
    <script type="text/javascript" src="layui/layui.js" th:src="@{/layui/layui.js}"></script>
    <script type="text/javascript" src="/js/user.js" th:src="@{/js/user.js}"></script>

    <style>
        .headPortrait{
            width: 30px;
            height: 30px;
        }
    </style>
</head>
<body>
<!-- 查询表单 -->
    <form class="layui-form" id="searchForm">
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="openid" id="openid" placeholder="请输入用户openid" />
            </div>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="nickName" id="nickName" placeholder="请输入昵称" />
            </div>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="qqNum" id="qqNum" placeholder="请输入QQ号" />
            </div>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="wechatNum" id="wechatNum" placeholder="请输入微信号" />
            </div>

            <button type="button" class="layui-btn" id="searchBtn" data-type="reload" style="margin-left: 20px" >搜索</button>
        </div>
    </form>
<!-- 数据表格 -->
    <table width="100%" class="layui-hide" id="userList" lay-filter="userList">

    </table>


<!-- 行工具栏 -->
    <script type="text/html" id="barUser">
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="sendMsg">发消息</a>
        {{# if(d.haveUserInfo == "2"){  }}
            <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="disableUser">禁用</a>
        {{# }else if(d.haveUserInfo == "3"){  }}
            <a class="layui-btn layui-btn-xs" lay-event="enableUser">恢复</a>
        {{# }}}
    </script>
<!-- 头工具栏 -->
    <script type="text/html" id="toobarUser">
        <button class="layui-btn layui-btn-sm layui-btn-primary" lay-event="refresh"><i class="iconfont iconshuaxin"></i>&nbsp;刷新</button>
    </script>

<!-- 数据格式 -->
    <script type="text/html" id="genderTpl">
        {{# if(d.gender == 1){ }}
            男
        {{# } else if(d.gender == 0){  }}
            女
        {{# } }}
    </script>
    <script type="text/html" id="headPortraitTpl">
        <img class="headPortrait" src="{{d.avatarUrl}}">
    </script>
    <script type="text/html" id="haveUserInfoTpl">
        {{# if(d.haveUserInfo == "0"){  }}
            <button class="layui-btn layui-btn-xs layui-btn-warm">不完善</button>
        {{# }else if(d.haveUserInfo == "1"){  }}
            <button class="layui-btn layui-btn-xs">部分完善</button>
        {{# }else if(d.haveUserInfo == "2"){  }}
            <button class="layui-btn layui-btn-xs layui-btn-normal">完善</button>
        {{# }else if(d.haveUserInfo == "3"){  }}
            <button class="layui-btn layui-btn-xs layui-btn-danger">已禁用</button>
        {{# }  }}
    </script>




</body>
</html>